#pragma once

#include <d3d9.h>


class ScreenTexture
{
private:
	LPDIRECT3DTEXTURE9 texture;
	IDirect3DDevice9* device;

	D3DSURFACE_DESC hostRenderTargetDescription;
	LPDIRECT3DSURFACE9 hostRenderTargetSurface;

	RECT dimensions;

public:
	ScreenTexture(IDirect3DDevice9* device, int downsampling=1);
	~ScreenTexture();

	LPDIRECT3DTEXTURE9 GetTexture(){ return texture; }
	void UpdateTexture();
};
